package car.aistar.service.Impl.xrb;

import car.aistar.entity.SellReserve;
import car.aistar.service.SellReserveService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

import java.util.Date;

/**
 * @ClassName testSellReserve
 * @Description TODO
 * @Author 0927
 * @Date 2020/10/1 19:23
 * Version 1.0
 **/

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath:spring/spring-*.xml")
public class testSellReserve {

    @Autowired
    private SellReserveService sellReserveService;


    @Test
    public void testSellById(){
        System.out.println(sellReserveService.queryById(2L));
    }

    @Test
    public void testSellByLimit(){
        System.out.println(sellReserveService.queryAllByLimit(4,2));
    }

    @Test
    public void testSellInsert(){
        SellReserve sellReserve = new SellReserve(null,new Date(),2L);
        sellReserveService.insert(sellReserve);
    }

    @Test
    public void testSellUpdate(){
        SellReserve sellReserve = new SellReserve(null,new Date(),2L);
        sellReserveService.update(sellReserve);
    }

    @Test
    public void testSellDeleteId(){
        sellReserveService.deleteById(31L);
    }

    @Test
    private void testQuery(){
        System.out.println(sellReserveService);
    }
}
